<?php
return [
    'id'=>'teacher-form',
    'template'=>'form_default',
    'enableClientValidation'=>false,
    'enableAjaxValidation'=>true,
    'options'=>['class'=>'form-validate'],
    'models'=>[
        'teacher'=>[
            'title'=>'教师管理',
            'th_with'=>60,
            'elements'=>[
                'name'=>[
                    'type'=>'text',
                    'options'=>[
                        'class'=>'input-text',
                    ],
                ],
                'img'=>[
                    'type'=>'widget',
                    'class'=>\doumiaoduo\ueditor\ImageUploadSingle::className(),
                    'options'=>[
                        'class'=>'input-text',
                    ],
                    'clientOptions'=>[
                        'serverUrl'=>\common\components\helpers\Fun::url(['/uploader/action'])
                    ],
                    'buttonOptions'=>[
                        'class'=>'button'
                    ],
                    'hint'=>'此图片优先显示',
                ],
                'mechanic_id'=>[
                    'type'=>'dropdownlist',
                    'options'=>[
                        'prompt'=>'选择机构名称',
                        'encode'=>false,
                    ],
                    'items'=>[],
                ],
                'description'=>[
                    'type'=>'widget',
                    'class'=>\doumiaoduo\ueditor\Ueditor::className(),
                    'clientOptions'=>[
                        'serverUrl'=>\common\components\helpers\Fun::url(['/uploader/action']),
                        'toolbars'=>[['fullscreen', 'source', '|', 'undo', 'redo', '|','bold', 'italic', 'underline', 'fontborder', 'strikethrough', 'superscript', 'subscript','rowspacingtop', 'rowspacingbottom', 'lineheight', '|','justifyleft', 'justifycenter', 'justifyright', 'justifyjustify','simpleupload','removeformat']],
                        'initialFrameWidth'=>'100%'
                    ],
                ],
                'is_headmaster'=>[
                    'type'=>'radiolist',
                    'items'=>[
                        '1'=>'是',
                        '0'=>'否',
                    ]
                ],
                'parent_id'=>[
                    'type'=>'dropdownlist',
                    'options'=>[
                        'prompt'=>'请选择班主任',
                        'encode'=>false,
                    ],
                    'items'=>[],
                ],
                'teach_cate'=>[
                    'type'=>'dropdownlist',
                    'options'=>[
                        'prompt'=>'请选择授课分类',
                        'encode'=>false,
                    ],
                    'items'=>[],
                ],
                'teach_cates'=>[
                    'type'=>'textarea',
                    'options'=>[
                        'readonly'=>'readonly',
                        'rows'=>10,
                    ],
                ],
                'teach_cate_id'=>[
                    'type'=>'hidden',
                ],
                'cate_id'=>[
                    'type'=>'dropdownlist',
                    'options'=>[
                        'prompt'=>'请选择分类',
                        'encode'=>false,
                    ],
                    'items'=>[
                        1=> '益智',
                        2=> '音乐',
                        3=> '形体',
                    ],
                ],
                'sex'=>[
                    'type'=>'radiolist',
                    'items'=>[
                        '1'=>'男',
                        '0'=>'女',
                    ]
                ],
                'age'=>[
                    'type'=>'text',
                    'options'=>['class'=>'input-text']
                ],
                'address'=>[
                    'type'=>'text',
                    'options'=>['class'=>'input-text']
                ],
                'mobile'=>[
                    'type'=>'text',
                    'options'=>['class'=>'input-text'],
                    'hint'=>'若填写,请填写手机号!否则自动生成形如：t12345的6位序列作为账号',
                ],
                'email'=>[
                    'type'=>'text',
                    'options'=>['class'=>'input-text']
                ],
                'status'=>[
                    'type'=>'radiolist',
                    'items'=>[
                        '1'=>'授课',
                        '0'=>'不授课',
                    ]
                ],
            ]
        ]
    ]
    
];